/**
 * 
 */
package qct.util;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
import org.springframework.stereotype.Repository;

/**
 * @author chentao.qu
 * @since 2012-8-14
 *
 */
@Repository("dynamicDataSource")
public class DynamicDataSource extends AbstractRoutingDataSource{

	@Override
	protected Object determineCurrentLookupKey() {
		return CustomerContextHolder.getCustomerType();
	}
}
